<template>
  <div class="index_article-list">
    <!-- 文章项 -->
    <div :class="showBanner ? 'wow animate__slideInRight index_article-item' : 'animated animate__slideInRight index_article-item'">
      <router-link to="/about" class="index_article-cover">
        <img src="https://www.static.banq.ink/photos/fa74451429d178e2682a3cf6e833c019.png">
      </router-link>
      <div class="index_article-info">
        <div to="/about" class="article-title">
          <span class="article-top">置顶</span>
          <router-link to="/about">文章标题</router-link>
        </div>
        <div class="article-abstract">文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要</div>
        <div class="article-meta">
          <div class="meta-item">
            <!-- 日期 -->
            <div class="item-date">
              <svg-icon icon="date"></svg-icon>
              <span>2022-03-04</span>
            </div>
            <!-- 访问量 -->
            <div class="item-view">
              <svg-icon icon="eye-open"></svg-icon>
              <span>28032</span>
            </div>
            <!-- 评论数 -->
            <div class="item-comment">
              <svg-icon icon="comment"></svg-icon>
              <span>165</span>
            </div>
            <!-- 标签 -->
            <router-link to="/about" class="item-tags">
              <svg-icon icon="tags"></svg-icon>
              <span>标签</span>
            </router-link>
          </div>
          <!-- 所属分类 -->
          <router-link to="/about" class="item-category">
            <svg-icon icon="category"></svg-icon>
            <span>所属分类</span>
          </router-link>
        </div>
      </div>
    </div>

    <div :class="showBanner ? 'wow animate__slideInRight index_article-item' : 'animated animate__slideInRight index_article-item'">
      <router-link to="/about" class="index_article-cover">
        <img src="https://www.static.banq.ink/photos/fa74451429d178e2682a3cf6e833c019.png">
      </router-link>
      <div class="index_article-info">
        <div to="/about" class="article-title">
          <router-link to="/about">文章标题</router-link>
        </div>
        <div class="article-abstract">文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要</div>
        <div class="article-meta">
          <div class="meta-item">
            <!-- 日期 -->
            <div class="item-date">
              <svg-icon icon="date"></svg-icon>
              <span>2022-03-04</span>
            </div>
            <!-- 访问量 -->
            <div class="item-view">
              <svg-icon icon="eye-open"></svg-icon>
              <span>28032</span>
            </div>
            <!-- 评论数 -->
            <div class="item-comment">
              <svg-icon icon="comment"></svg-icon>
              <span>165</span>
            </div>
            <!-- 标签 -->
            <router-link to="/about" class="item-tags">
              <svg-icon icon="tags"></svg-icon>
              <span>标签</span>
            </router-link>
          </div>
          <!-- 所属分类 -->
          <router-link to="/about" class="item-category">
            <svg-icon icon="category"></svg-icon>
            <span>所属分类</span>
          </router-link>
        </div>
      </div>
    </div>

    <div :class="showBanner ? 'wow animate__slideInRight index_article-item' : 'animated animate__slideInRight index_article-item'">
      <router-link to="/about" class="index_article-cover">
        <img src="https://www.static.banq.ink/photos/fa74451429d178e2682a3cf6e833c019.png">
      </router-link>
      <div class="index_article-info">
        <div to="/about" class="article-title">
          <router-link to="/about">文章标题</router-link>
        </div>
        <div class="article-abstract">章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要</div>
        <div class="article-meta">
          <div class="meta-item">
            <!-- 日期 -->
            <div class="item-date">
              <svg-icon icon="date"></svg-icon>
              <span>2022-03-04</span>
            </div>
            <!-- 访问量 -->
            <div class="item-view">
              <svg-icon icon="eye-open"></svg-icon>
              <span>28032</span>
            </div>
            <!-- 评论数 -->
            <div class="item-comment">
              <svg-icon icon="comment"></svg-icon>
              <span>165</span>
            </div>
            <!-- 标签 -->
            <router-link to="/about" class="item-tags">
              <svg-icon icon="tags"></svg-icon>
              <span>标签</span>
            </router-link>
          </div>
          <!-- 所属分类 -->
          <router-link to="/about" class="item-category">
            <svg-icon icon="category"></svg-icon>
            <span>所属分类</span>
          </router-link>
        </div>
      </div>
    </div>

    <div :class="showBanner ? 'wow animate__slideInRight index_article-item' : 'animated animate__slideInRight index_article-item'">
      <router-link to="/about" class="index_article-cover">
        <img src="https://www.static.banq.ink/photos/fa74451429d178e2682a3cf6e833c019.png">
      </router-link>
      <div class="index_article-info">
        <div to="/about" class="article-title">
          <router-link to="/about">文章标题</router-link>
        </div>
        <div class="article-abstract">章摘要文章摘要文章摘要文章摘要文章摘要</div>
        <div class="article-meta">
          <div class="meta-item">
            <!-- 日期 -->
            <div class="item-date">
              <svg-icon icon="date"></svg-icon>
              <span>2022-03-04</span>
            </div>
            <!-- 访问量 -->
            <div class="item-view">
              <svg-icon icon="eye-open"></svg-icon>
              <span>28032</span>
            </div>
            <!-- 评论数 -->
            <div class="item-comment">
              <svg-icon icon="comment"></svg-icon>
              <span>165</span>
            </div>
            <!-- 标签 -->
            <router-link to="/about" class="item-tags">
              <svg-icon icon="tags"></svg-icon>
              <span>标签</span>
            </router-link>
          </div>
          <!-- 所属分类 -->
          <router-link to="/about" class="item-category">
            <svg-icon icon="category"></svg-icon>
            <span>所属分类</span>
          </router-link>
        </div>
      </div>
    </div>

    <div :class="showBanner ? 'wow animate__slideInRight index_article-item' : 'animated animate__slideInRight index_article-item'">
      <router-link to="/about" class="index_article-cover">
        <img src="https://www.static.banq.ink/photos/fa74451429d178e2682a3cf6e833c019.png">
      </router-link>
      <div class="index_article-info">
        <div to="/about" class="article-title">
          <router-link to="/about">文章标题</router-link>
        </div>
        <div class="article-abstract">文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要文章摘要</div>
        <div class="article-meta">
          <div class="meta-item">
            <!-- 日期 -->
            <div class="item-date">
              <svg-icon icon="date"></svg-icon>
              <span>2022-03-04</span>
            </div>
            <!-- 访问量 -->
            <div class="item-view">
              <svg-icon icon="eye-open"></svg-icon>
              <span>28032</span>
            </div>
            <!-- 评论数 -->
            <div class="item-comment">
              <svg-icon icon="comment"></svg-icon>
              <span>165</span>
            </div>
            <!-- 标签 -->
            <router-link to="/about" class="item-tags">
              <svg-icon icon="tags"></svg-icon>
              <span>标签</span>
            </router-link>
          </div>
          <!-- 所属分类 -->
          <router-link to="/about" class="item-category">
            <svg-icon icon="category"></svg-icon>
            <span>所属分类</span>
          </router-link>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ArticleList',

  data () {
    return {

    }
  },

  computed: {
    showBanner () {
      return this.$store.getters.showBanner
    }
  },

  mounted () {

  },

  methods: {

  }
}
</script>

<style lang="scss" scoped>
.index_article-list {
  height: auto;
}
.index_article-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  height: 12rem;
  padding: 1rem 0;

  .index_article-cover {
    flex-shrink: 0;
    position: relative;
    width: 16.875rem;
    height: 10rem;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 5px;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: all 0.3s;
    }
  }

  .index_article-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
    width: calc(100% - 210px);
  }
  .article-title {
    width: 100%;
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 24px;
    max-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;

    .article-top {
      height: 100%;
      padding: 0 6px;
      margin-right: 0.75rem;
      line-height: 20px;
      font-size: 12px;
      white-space: nowrap;
      vertical-align: 2px;
      color: #fff;
      background-image: -webkit-linear-gradient(0deg,#3ca5f6 0,#a86af9 100%);
      border-radius: 2px 6px;
    }
  }
  .article-abstract {
    width: 100%;
    color: #909399;
    line-height: 22px;
    max-height: 66px;
    opacity: .85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    margin-bottom: 10px;
  }
  .article-meta {
    position: relative;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    color: #606266;
    font-size: 13px;
    margin-top: auto;

    .meta-item {
      display: flex;
      align-items: center;
      -webkit-box-align: center;
      -ms-flex-align: center;
    }

    .item-date {
      display: flex;
      align-items: center;
      margin-right: 0.75rem;
      .svg-icon {
        margin-right: 4px;
      }
    }
    .item-view {
      display: flex;
      align-items: center;
      margin-right: 0.75rem;

      .svg-icon {
        margin-right: 4px;
      }
    }
    .item-comment {
      display: flex;
      align-items: center;
      margin-right: 0.75rem;
      .svg-icon {
        margin-right: 4px;
      }
    }
    .item-tags {
      display: flex;
      align-items: center;
      margin-right: 0.75rem;
      transition: color 0.35s;
      .svg-icon {
        margin-right: 4px;
      }
    }
    .item-category {
      transition: color 0.35s;
      .svg-icon {
        margin-right: 4px;
      }
    }
  }
}
.index_article-cover:hover {
  img {
    transform: scale(1.1);
  }
}
</style>
